package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@TableName("products")
//@Data注解 简化get和set方法
@Data
public class Products extends BaseEntity implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)  //实现自增;如果主键名不是id,则需要补充:value='userId'
    private String cover;
    private String name;
    private String description;
    private Integer price;
    private Integer sales;
    private String category;
    private Integer inventory;
    private List<String> categories;
    private String categoryId;
    private String categoryName;
}
